package org.lgh.webchatback.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.lgh.webchatback.bo.UserBo;
import org.lgh.webchatback.common.R;
import org.lgh.webchatback.entity.Users;
import org.lgh.webchatback.netty.ChatMsg;

import java.util.List;

/**
 * @author wei-xhh
 * @date 2022-01-19
 */
public interface UserService extends IService<Users> {
    R registerOrLogin(String username, String password, String cid);

    R setNickname(String id, String nickname);

    R uploadFaceBase64(UserBo userBo) throws Exception;

    R searchFriend(String myUserId, String friendUserName);

    R addFriendRequest(String myUserId, String friendUserName);

    R queryFriendRequest(String userId);

    R operFriendRequest(String acceptUserId, String sendUserId, String operType);

    R myFriends(String userId);

    String saveMsg(ChatMsg chatMsg);

    void updateMsgSigned(List<String> msgIdList);

    R getUnReadMsgList(String acceptUserId);
}
